package apiday02;

public class RegDemo03 {
    public static void main(String[] args) {
        /**
         * 测试；用户名规则
         */
        String reg = "\\w{6}";
        System.out.println(reg);
        String s1 = "Jerry1";
        String s2 = "Tpm-12";
        String s3 = "Jerry3";

        System.out.println(s1.matches(reg));
        System.out.println(s2.matches(reg));
        System.out.println(s3.matches(reg));


        /*String reg = "\\w{6}";
        System.out.println(reg);
        String s1 = "Jerry1";
        String s2 = "Tpm-12";
        String s3 = "Jerry3";
        System.out.println(s1.matches(reg));
        System.out.println(s2.matches(reg));
        System.out.println(s3.matches(reg));

         */
    }
}